home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 19 / Amiga Plus Leser CD 19.iso / Tools / Freeware / Kray / V12_AllPlatforms / kray.readme < prev   
Encoding:
Text File  |  2002-10-10  |  11.1 KB  |  273 lines

  1. 0.KulkiRay - freeware raytracer by Grzegorz Tanski
  2.  
  3. 1.Usage:
  4. Kray scene_filename [picture_filename]
  5.  
  6. Default picture_filename is "rend.bmp". It may be changed by outputto command.
  7. Every instruction must be ended with ';'.
  8. Note that Kray loads all external files from current directory.
  9.  
  10. 2.Instruction set
  11.  
  12. "'"
  13. "%"
  14. "rem"
  15. "//"
  16. comment
  17.  
  18. "end",
  19. ends script
  20.  
  21. "echo |txt|"
  22. print |txt| on screen while reading scene file ex.:
  23. echo "Ala ma kota";
  24.  
  25. "eval |expr|"
  26. print on screen value of expresion |expr| ex.:
  27. eval 2+2;
  28.  
  29. "varible |new varible|,|expr|"
  30. means |symbol|=|expr| ex.
  31. varible a,10;
  32.  
  33. "alias |symbol1|(alias_name),|symbol2|"
  34. makes an alias |symbol1| of symbol |symbol2|
  35.  
  36. "object |shape|,|surface|,|blend|",
  37. adds object to a scene
  38.  
  39. "light |light_kind|"
  40. adds a light to a scene |light_kind| can be:
  41.     point,|vector|,|color|
  42.     sharpspot,|vector1|(position),|vector2|(direction),|color|,|value|
  43.     projector1,|vector|(position),|axes|(orientation),|bitmap|
  44.     projector21col,|vector|(position),|axes|(orientation),|bitmap|,|color|
  45.     projector21,|vector|(position),|axes|(orientation),|bitmap|
  46.     projector22,|vector|(position),|axes|(orientation),|bitmap1|,|bitmap2|
  47.     ambient,|color|
  48.     parallel,|vector|(direction),|color|
  49.     pointball,|vector|position,|color|,|axes|orientation,|expr|secondary rays x,|expr|secondary rays y,|expr|radius
  50.     pointwall,|vector|position,|color|,|axes|orientation,|expr|secondary rays x,|expr|secondary rays y,|expr|size x,|expr|size y
  51.     smapoint,|shadowmap|,|color|
  52.     name,|light|
  53.     fade2,|light|,|vector|pos,|expr|fade factor
  54.     fadepoint,|vector|pos,|color|;
  55.     fade,|light|
  56.  
  57. "value |symbol|"
  58. shows a value of symbol |symbol|
  59.  
  60. "color |new color|,r,g,b"
  61. makes a new color
  62.  
  63. "vector |new vector|,x,y,z"
  64. defines |new vectir| as 3d vector
  65.  
  66. "shape |new shape|,|shape_type|"
  67. makes |new shape| a shape.|shape_type| can be:
  68.     wall,|vector|(position),|vector|(direction)
  69.     sphere,|vector|(position),|expr|radius
  70.     insphere,|vector|(position),|expr|radius
  71.     triangle,|vector1|,|vector2|,|vector3|
  72.     trimesh,|vector|(pos),|axes|(ori),|filename.lwob|
  73.     inttrimesh,|vector|(pos),|axes|(ori),|expr|(max.smoothing angle),|filename.lwob|
  74.     tube,|vector|(pos),|axes|(or),|expr|(radius),|expr|(len)
  75.     cone,|vector|(pos),|axes|(or),|expr|,|expr|,|expr|
  76.     paraboloid,|vector|(pos),|axes|(or),|expr|,|expr|,|expr|
  77.     circle,|vector|(pos),|vector|(dir),|expr|(radius)
  78.     square,|vector|(pos),|vector|(dx),|vector|(dy)
  79.     and2,|shape|1,|shape|2
  80.     or2,|shape|1,|shape|2
  81.     sub2,|shape|1,|shape|2
  82.     box,|vector|pos,|axes|,|expr|lenght,|expr|width,|expr|height
  83.     eliptube,|vector|(pos),|axes|(or),|expr|radius1,|expr|radius2,|expr|(len)
  84.     elipcone,|vector|(pos),|axes|(or),|expr|radius1,|expr|radius2,|expr|,|expr|
  85.     elipparaboloid,|vector|(pos),|axes|(or),|expr|radius1,|expr|radius2,|expr|,|expr|
  86.     neg,|shape|
  87.     
  88. "axes |new axes|,xx,xy,xz,yx,yy,yz,zx,zy,zz"
  89. or
  90. "axes |symbol|,|vectorx|,|vectory|,|vectorz|"
  91. makes |new axes| a 3x3 matrix
  92.  
  93. "eyeaxes |new axes|"
  94. makes |new axes| eye matrix;
  95.  
  96. "hpbaxes |new axes|,|expr|h,|expr|p,|expr|b"
  97.  
  98. "blend |new blend|,|blend_type|"
  99. makes |new blend| a blend.|blend_type| can be:
  100.     total
  101.     none
  102.     partial,|color|filter
  103.     superficial,|texture|
  104.  
  105. "bitmap |new bitmap|,|text|filename"
  106. makes |new bitmap| a bitmap loaded from file filename
  107.  
  108. "texture |new texture|,|texture_type|"
  109. defines symbol |new texture| as texture.|texture_type| can be:
  110.     color,|color|
  111.     bitmap,|mapping|,|bitmap|
  112.     bitmapbness,|mapping|,|bitmap|,|expr|brightness
  113.  
  114. "mapping |new mapping|"
  115. makes |new mapping| a mapping setting.|mapping_type| can be:
  116.     rect,|vector|(dir x),|vector|(dir y),|vector|(positon)
  117.     sphere,|vector|(pos),|axes|(orientation)
  118.     tube,|vector|(pos),|axes|(orientation),|expr|(len y)
  119.     
  120. "surface |new surface|,|surface_type|"
  121. makes |new surface| a surface.|surface_type| can be:
  122.     shademetrefl,|texture|,|expr|(%shade),|expr|(%metal),|expr|(glossiness),|expr|(%specularity)
  123.     zerotransglass,|texture|,|expr|(%shade),|expr|(%metal),|expr|(%trans),|expr|(glossiness),|expr|(%specularity)
  124.     zeroglassmulti,|texture|,|expr|(%shade),|expr|(%metal),|color|(filter),|expr|(%trans),|expr|(glossiness),|expr|(%specularity)
  125.     zerotransmulti,|texture|,|expr|(%shade),|expr|(%metal),|expr|(glass n),|expr|(%trans),|expr|(glossiness),|expr|(%specularity)
  126.     shadereflect,|texture|,|expr|(%shade),|expr|(glossiness),|expr|(%specularity)
  127.     multi,|texture|,|expr|(%shade),|expr|(%metal),|expr|(glass n),|color|(filter),|expr|(%trans),|expr|(glossiness),|expr|(%specularity)
  128.     metalic
  129.     shaded,|texture|
  130.     default
  131.     energetic,|texture|own_light,|texture|reflected_light,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor v0.91+
  132.     smoothenergetic,|texture|own_light,|texture|reflected_light,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor  v0.91+
  133.     shenergetic,|texture|own_light,|texture|reflected_light,|texture|nonerg_lights_reflect,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor  v0.91+
  134.     shsmoothenergetic,|texture|own_light,|texture|reflected_light,|texture|nonerg_lights_reflect,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor  v0.91+
  135.     sdenergetic,|texture|own_light,|texture|reflected_light,|texture|nonerg_lights_reflect,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor  v0.91+
  136.     sdsmoothenergetic,|texture|own_light,|texture|reflected_light,|texture|nonerg_lights_reflect,|expr|subfacesize,|expr|own_light_scalefactor,|expr|reflected_scalefactor  v0.91+
  137.     hybrid2,|surface|s1,|expr|%surface,|surface|s2,|expr|%surface2
  138.     hybrid3,
  139.     hybrid4,
  140.     reflect,|expr|(glossiness)
  141.     black,
  142.     glasstransparnet,|expr|glassn,|color|transparentfilter
  143.     glasstransparnet2,|expr|glassn,|color|transparentfilter
  144.     colored,|texture|
  145.     stransparent,|texture|filter_texture
  146.     filtermetalic,|texture|filter
  147.     sglasstransparent,|expr|n,|texture|filter
  148.     in,|surface|
  149.     out,|surface|
  150.     shademap,|texture|,|bitmap|shademap picture,|expr|bmap nrightnes
  151.     reflectmap,|texture|,|bitmap|shademap picture,|expr|bmap nrightnes
  152.     envmap,|axes|orientation,|bitmap|envmap picture
  153.     blurmetalic,|expr|blur,|expr|secondary rays
  154.     blur,|surface|,|expr|blur,|expr|secondary rays
  155.     filter,|surface|,|tecture|filter
  156.     dside,|surface|
  157.     stat,|texture|
  158.     color,|texture|
  159.     statreflect,|expr|blur_factor,|expr|no_of_rays;
  160.  
  161.     coscolor,|texture|
  162.     qstat,|texture|
  163.     qstatreflect,|expr|blur_factor,|expr|no_of_rays;
  164.     pmcshaded,|texture|
  165.      pmdirect,|texture|
  166.     cshaded,|texture|
  167.     gradcachetest
  168.     nrgshaded2,|texture|,|expr|subfacesize
  169.     nrgcshaded2,|texture|,|expr|subfacesize
  170.     pmshaded,|texture|
  171.     gstat,|texture|
  172.     nrgshaded,|texture|,|expr|subfacesize
  173.     nrgcshaded,|texture|,|expr|subfacesize
  174.  
  175. "bump |surface|,|mapping|,|bitmap|,|expr|"
  176. adds bumping to surface |surface| using |mapping| and |bitmap|.|expr| is a depth of bumps (usually 1).
  177.  
  178. "background |background_kind|"
  179. seta background.|background_kind| can be:
  180.     color,|color|
  181.     sky,|color1|,|color2|,|color3|,|vector|dir
  182.     bitmap,|bitmap|,|vector1|,|vectpr2|
  183.     bitmap2,|bitmap|,|bitmap|,|axes|
  184.     
  185. "spot |vector|(pos),|axes|(ori),|expr|(angle),|color|(filter),|expr|(intensivity),|expr|(falloff)"
  186.  
  187. "lightspot |vector|(pos),|axes|(ori),|expr|(angle),|color|(filter),|expr|(intensivity),|expr|(falloff)",
  188.  
  189. "softlightspot |vector|(pos),|axes|(ori),|expr|(angle1),|expr|(angle2),|color|(filter),|expr|(intensivity),|expr|(falloff)",
  190.  
  191. "camera |camera_type|",
  192.     picture,|expr|(screen_width),|expr|(screen_height),|expr|(zoom),|vector|(pos),|axes|(ori)
  193.     envmap,|expr|(screen_width),|expr|(screen_height),|vector|(pos),|axes|(ori)
  194.  
  195. "antialias |expr|edge_detection_sensitivity,|expr|rays_per_pixel",
  196. antialiasing setting. if |expr1|=|expr2|=0 , no antialiasing
  197.  
  198. "outputto |filename.bmp|"
  199. sets filename for image to save
  200.  
  201. "energetic |expr|"
  202. sets number of iterations for energy matrix
  203.  
  204. "recurse |expr|"
  205. sets numer of maximum depth of rays recursion
  206.  
  207. "scale |vector,varible,matrix,color|,expr"
  208. scales an object for example a vector
  209.  
  210. "shadowmap |new shadowmap|,|vector|position,|expr|size x,|expr|size y"
  211. defines new shadowmap.
  212.  
  213. "enviroment |enviroment_definition|"
  214. adds enviroment effect to scene. |enviroment_definition| can be:
  215.     fade,|expr|fade factor
  216.     colorface,|color|color,|expr|fade factor
  217.     veffect,|light|,|expr|intensivity,|expr|sampling start distance,|expr|samplig begin step,|expr|samplin end step,|expr|number of samples
  218.  
  219. "lightdefine |new light|,|light_kind|"
  220. Defines |new light| as light. Opposite to "light" function it doesn't add light to scene. It only
  221. defines a new symbol that can be used in future.
  222.  
  223. "otree |expr|max nodes,|expr|minimum objects for leaf"
  224. Defines octal trees scene decomposition depth.
  225.  
  226. "objectset |object_set_definition|"
  227. adds set of objects to scene. Currently it is the best way to import lightwave objects to Kray.|object_set_definition| looks like this:
  228.     |intrimesh|,|vector|position,|axes|orientation,|expr|max smothing angle,|surface|default surface,|blend|default blending
  229.     you can optionally add definitions of surfaces (if objects has multiple surfaces)
  230.     ,number,|expr|surface number,|surface|surface for this number,|blend|blend for this number
  231.     or
  232.     ,next,|surface|surface for next number,|blend|blend for next number
  233.  
  234. "maxraycolor |expr|maxrays"
  235. Defines color which will be set if ray reach maximum recursion depth. Default value black (0,0,0)
  236.  
  237. "statavg |expr|number_of_rays"
  238. Number of rays in all Monte Carlo computations for difusse surfaces.
  239.  
  240. "causticspm |expr|number_of_photons,|expr|minimum_photons,|expr|start,|expr|stop,|expr|step,|expr|test;
  241. Defaines parameters for caustic photon map. In preprocessing step Kray sends number_of_photons to the scene.
  242. They hit surfaces and are stored. While rendering Kray tries to find photons that are 
  243. nearest neighbours to intersection point. minimum_photons is a minimal number of 
  244. neighbours that satisfy tracer. Searching is done by increasing radius of a sphere 
  245. centered in intersection point and counting points inside a sphere. start,stop,step 
  246. are parameters for searching. When caustics are rendered Kray does one step before 
  247. searching it tests number of photons in sphere with radius test. If there are no photons
  248. searching is not done.
  249.  
  250. "globalpm |expr|number_of_photons,|expr|minimum_photons,|expr|start,|expr|stop,|expr|step;
  251. See causticspm. Global photon map does not use testing.
  252.  
  253. "outsidesize |expr|x"
  254. It defines resolution of 3d space. Ii is minimum distance between 2 separate shapes;
  255.  
  256. "pixelorder |order|"
  257. Choses pixel order in rendering. You may choose between scanline,scanrow,random,progressive.
  258. Random or progressive pixel order are recomended if you are using meshless caching scheme
  259. (irradiance gradients).
  260.  
  261. "pmcorner |expr|mindist,|expr|max_weight"
  262. Defines special conrer treating in photon mapping.
  263.  
  264. 3. Basic data types
  265.  
  266. |expr| - regural expresion such as 2+2
  267. |vector| - varible created by vector function or (x,y,z) ex. (100,200,0)
  268. |axes| - set of axes, created by eyeaxes,hpbaxes etc. function or <Heading,Pitching,Banking> in degrees ex.<90,0,0>
  269.  
  270. 4. This file is only quick reference. To find out more about Kray visit www.kray.3d.pl.
  271. In case of any questions write to me: gtanski@elka.pw.edu.pl .If you want to support me
  272. somehow I would be very glad.
  273.